$(function(){

    $('#saveOperation').click(function(){
        saveOperation();
    });


});

function saveOperation() {

    var _dom = $(window.parent.document).find('#iframeCommModal');
    // var _dom = $('#iframeCommModal');

    var appId = antUtil.getSes('appId');//系统编码
    var userId = antUtil.getSes('userId');//用户编码
    var url = _dom.attr('data-url');//链接url
    var title = _dom.attr('data-title');//链接标题
    var id = _dom.attr('data-id');//链接ID
    var pageId = $('#pageSelect option:selected').val();//对应要发布的常用操作频道id
    var pageTitle = $('#pageSelect option:selected').text();

    var tokenId = antUtil.getSes('tokenId');
    $.ajax({
        url: "commonOperation/updateCommonOperation",
        type: 'GET',
        dataType: "json",
        data: {
            tokenId: tokenId,
            appId:appId,
            userId:userId,
            url:url,
            title:title,
            id:id,
            pageId:pageId,
            pageTitle:pageTitle
        },
        success: function (data) {
            $(window.parent.document).find('#closeCommonOperModal').click();
        }
    })


}